package com.tao.lab.power.usb.model;

/**
 * title:
 * description:
 * @author gongmin.li
 * @version 1.0.0
 * @since 2020-05-07
 */
public enum UsbSerialStatus {
    NONE("无状态", 0),
    SERIAL_PORT("检查串口", 1),
    SERIAL_PORT_OK("串口检查成功", 2),
    SERIAL_PORT_FAIL("串口检查失败", -1),
    DATA_CHECK("数据校验", 3),
    DATA_CHECK_OK("数据校验成功", 4),
    DATA_CHECK_FAIL("数据校验失败", -2),
    SERIAL_CHECK_FINISH("串口检查完成", 5),
    SERIAL_RUNNING("串口正在运行", 6),
    SERIAL_DISCONNECT("串口连接断开", -3),
    SERIAL_CLOSE("串口正常关闭", -4);

    private String enumName;
    private int enumPriority;

    UsbSerialStatus(String enumName, int enumPriority) {
        this.enumName = enumName;
        this.enumPriority = enumPriority;
    }

    public String getEnumName() {
        if (null == enumName) {
            enumName = "";
        }
        return enumName;
    }

    public void setEnumName(String enumName) {
        this.enumName = enumName;
    }

    public int getEnumPriority() {
        return enumPriority;
    }

    public void setEnumPriority(int enumPriority) {
        this.enumPriority = enumPriority;
    }
}
